package chapter6;

/**
 * 带有成员变量的枚举
 */
public class GenderTest {
    public static void main(String[] args) {
        Gender g = Enum.valueOf(Gender.class, "FEMALE");
        g.setName("男");
        System.out.println(g + "代表:" + g.getName());
    }
}
